<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>弓友之家</title>
    <link rel="stylesheet" href="css/mui.css" />
    <link rel="stylesheet" href="fonts/iconfont.css" />
    <link rel="stylesheet" href="css/style.css" />
    <style>
    	.page{padding-top: 44px;}
    </style>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">积分规则</h1>
		<a class="mui-icon mui-icon-more-filled mui-pull-right shareBtn"></a>
	</header>
	<div class="mui-content">
		<div class="rank-title mui-clearfix">
			<a data-href="integralrank.html">个人年度排行榜</a>
			<a data-href="integralrank02.html">团队年度排行榜</a>
			<a data-href="rule.html" class="on">规则</a>
		</div>
		<div class="page">
			<article>
			 	
			</article>
		</div>
	</div>
	<!--分享-->
	<div class="shareWx mui-hidden"> 
		<ul class="mui-list-unstyled">
			<li class="tel"><a href="javascript:void(0)" onclick="shareWeixinMessage(1)">微信好友</a></li>
			<li class="qq"><a href="javascript:void(0)" onclick="shareWeixinMessage(2)">朋友圈</a></li>
		</ul>
		<button type="button" class="cancleShare">取消</button>
	</div>
	<script type="text/javascript" src="js/mui.min.js" ></script>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js" ></script>
	<script type="text/javascript" src="js/common.js" ></script>
	<script type="text/javascript" charset="utf-8">
      	mui.init();
      	var tit="",des="",img="";
      	mui.ajax(H_SRC+'/amier/index/rule_detail',{
			data:{
				token:token
			},
			dataType:'json',
			type:'post',
			timeout:10000,             
			success:function(data){
				var dataurl=data.data;
				if(data.code == 1){
					tit=data.share_msg.share_title;
					des=data.share_msg.share_desc;
					img=H_SRC+data.share_msg.share_pic;
					$("article").html(dataurl.content);
				}else{
					mui.toast(data.msg);
				}
			},
			error:function(){
				
			}
		}) 
		$(".rank-title").on("tap","a",function(){ 
      		var href=$(this).attr("data-href");
      		mui.openWindow({
				url:href,
				id:href,
				createNew:true,
				show: {
					autoShow: true,
					aniShow: 'slide-in-right',
					duration: 200
				}
			});
      	})
		
		function shareWeixinMessage(type){
			var type=type;
			if(type==1){
				var secne="WXSceneSession"
			}else{
				var secne="WXSceneTimeline"
			}
			sharewx.send( 
				{ 
					title:tit,
					content:des, 
					href:H_SRC+'/rule',
					thumbs: [img], 
		        	pictures: [img], 
					extra:{scene:secne}
				}, 
				function(){
					mask.close();
					$(".shareWx").addClass("mui-hidden");
					mui.toast( "分享成功！" );
				}, function(e){
					mask.close();
					$(".shareWx").addClass("mui-hidden");
					mui.toast( "取消分享");
				}
			);
		}
    </script>
</body>
</html>